//package com.feicheng.iou.config;
//
//import com.feicheng.iou.constant.SessionConstant;
//import com.feicheng.iou.entity.User;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//
///**
// * @Author tianchunlei
// * @Des //
// * @Date 2021/7/28
// **/
//@Component
//public class PermissionInterceptor implements HandlerInterceptor {
//
//    @Autowired
//    private HttpSession session;
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//       //既能查询权限
//        session = request.getSession();
//
////        User user = (User) session.getAttribute("CURRENT");        //拦截权限
////
////        //调用wuweinan按照用户id查询角色和权限
////        user.getUserId();
////
////        session.setAttribute(SessionConstant.USER_ROLE_PERMISSION,null);
////
////        //判断权限列表中是否有"可分配" 写在resourceService
//        return true;
//    }
//}
